/*
	Statistics class holds counters for CAS operations statistics
*/
#ifndef STATISTICS_H_
#define STATISTICS_H_
#include <iostream>
using namespace std;

class Statistics{
	int CAS_totalCount;
	int CAS_failuresCount;

public:
	Statistics():CAS_totalCount(0),CAS_failuresCount(0){}

	void CAS_count_inc(){CAS_totalCount++;}

	void CAS_failures_inc(){CAS_failuresCount++;}

	/* add fields of another Statistics object */
	void add(Statistics* stat);

	/* divide counters by num */
	void normalize(int num);

	void print();
};
#endif /* STATISTICS_H_ */
